from django.urls import path, include
from rest_framework.routers import DefaultRouter
from . import views

router = DefaultRouter()
router.register(r'gitlab-servers', views.GitLabServerViewSet)
router.register(r'projects', views.ProjectViewSet)
router.register(r'environments', views.EnvironmentViewSet)
router.register(r'user-project-permissions', views.UserProjectPermissionViewSet)
router.register(r'gitlab-projects', views.GitLabProjectViewSet)
router.register(r'gitlab-users', views.GitLabUserViewSet)
router.register(r'gitlab-audit', views.GitLabAuditViewSet)
router.register(r'devops-timeline', views.DevOpsTimelineViewSet)

urlpatterns = [
    path('', include(router.urls)),
    path('webhook/', views.GitLabWebhookView.as_view(), name='gitlab-webhook'),
]
